#ifndef DISPLAY_RETURN_CODE_HPP_
#define DISPLAY_RETURN_CODE_HPP_
#include <fastdds/dds/domain/DomainParticipantFactory.hpp>
class DisplayReturnCode{
        public:
        static void display(const eprosima::fastrtps::types::ReturnCode_t& error_code, std::string additional_information=""){
                switch (error_code())
                {
                case eprosima::fastrtps::types::ReturnCode_t::RETCODE_OK :
                        EPROSIMA_LOG_ERROR(DisplayReturnCode, additional_information<<"eprosima::fastrtps::types::ReturnCode_t::RETCODE_OK");
                        break;
                case eprosima::fastrtps::types::ReturnCode_t::RETCODE_ERROR :
                        EPROSIMA_LOG_ERROR(DisplayReturnCode, additional_information<<"eprosima::fastrtps::types::ReturnCode_t::RETCODE_ERROR");
                        break;
                case eprosima::fastrtps::types::ReturnCode_t::RETCODE_UNSUPPORTED :
                        EPROSIMA_LOG_ERROR(DisplayReturnCode, additional_information<<"eprosima::fastrtps::types::ReturnCode_t::RETCODE_UNSUPPORTED");
                        break;
                case eprosima::fastrtps::types::ReturnCode_t::RETCODE_BAD_PARAMETER :
                        EPROSIMA_LOG_ERROR(DisplayReturnCode, additional_information<<"eprosima::fastrtps::types::ReturnCode_t::RETCODE_BAD_PARAMETER");
                        break;
                case eprosima::fastrtps::types::ReturnCode_t::RETCODE_PRECONDITION_NOT_MET :
                        EPROSIMA_LOG_ERROR(DisplayReturnCode, additional_information<<"eprosima::fastrtps::types::ReturnCode_t::RETCODE_PRECONDITION_NOT_MET");
                        break;
                case eprosima::fastrtps::types::ReturnCode_t::RETCODE_OUT_OF_RESOURCES :
                        EPROSIMA_LOG_ERROR(DisplayReturnCode, additional_information<<"eprosima::fastrtps::types::ReturnCode_t::RETCODE_OUT_OF_RESOURCES");
                        break;
                case eprosima::fastrtps::types::ReturnCode_t::RETCODE_NOT_ENABLED :
                        EPROSIMA_LOG_ERROR(DisplayReturnCode, additional_information<<"eprosima::fastrtps::types::ReturnCode_t::RETCODE_NOT_ENABLED");
                        break;
                case eprosima::fastrtps::types::ReturnCode_t::RETCODE_IMMUTABLE_POLICY :
                        EPROSIMA_LOG_ERROR(DisplayReturnCode, additional_information<<"eprosima::fastrtps::types::ReturnCode_t::RETCODE_IMMUTABLE_POLICY");
                        break;
                case eprosima::fastrtps::types::ReturnCode_t::RETCODE_INCONSISTENT_POLICY :
                        EPROSIMA_LOG_ERROR(DisplayReturnCode, additional_information<<"eprosima::fastrtps::types::ReturnCode_t::RETCODE_INCONSISTENT_POLICY");
                        break;
                case eprosima::fastrtps::types::ReturnCode_t::RETCODE_ALREADY_DELETED :
                        EPROSIMA_LOG_ERROR(DisplayReturnCode, additional_information<<"eprosima::fastrtps::types::ReturnCode_t::RETCODE_ALREADY_DELETED");
                        break;
                case eprosima::fastrtps::types::ReturnCode_t::RETCODE_TIMEOUT :
                        EPROSIMA_LOG_ERROR(DisplayReturnCode, additional_information<<"eprosima::fastrtps::types::ReturnCode_t::RETCODE_TIMEOUT");
                        break;
                case eprosima::fastrtps::types::ReturnCode_t::RETCODE_NO_DATA :
                        EPROSIMA_LOG_ERROR(DisplayReturnCode, additional_information<<"eprosima::fastrtps::types::ReturnCode_t::RETCODE_NO_DATA");
                        break;
                case eprosima::fastrtps::types::ReturnCode_t::RETCODE_ILLEGAL_OPERATION :
                        EPROSIMA_LOG_ERROR(DisplayReturnCode, additional_information<<"eprosima::fastrtps::types::ReturnCode_t::RETCODE_ILLEGAL_OPERATION");
                        break;
                case eprosima::fastrtps::types::ReturnCode_t::RETCODE_NOT_ALLOWED_BY_SECURITY :
                        EPROSIMA_LOG_ERROR(DisplayReturnCode, additional_information<<"eprosima::fastrtps::types::ReturnCode_t::RETCODE_NOT_ALLOWED_BY_SECURITY");
                        break;
                default:
                        break;
                }
        }
};

#endif